package mya.mes.mdc.module.excel.service.impl;

import mya.mes.mdc.model.excel.ExcelData;
import mya.mes.mdc.model.excel.ExcelFileData;
import mya.mes.mdc.model.excel.ExcelParse;
import mya.mes.mdc.module.excel.service.ExcelImportService;

import java.io.IOException;

public class ExcelImportServiceImpl implements ExcelImportService {

  @Override
  public ExcelData tagDefExcel(ExcelFileData excel) {
    ExcelData data = null;
    try {
      System.out.println("开始解析Excel文件：" + excel.excelFile);
      ExcelParse parse = new ExcelParse();
      data = parse.parse(excel.excelFile);
      data.shop = excel.shop;
      data.area = excel.area;
    } catch (IOException e) {
      e.printStackTrace();
    }
    return data;
  }
}
